package com.smart.framework.utils;

/**
 * 正则表达式工具类
 */
public class RegexPatterns {

    /**
     * 手机号正则
     */
    public static final String PHONE_REGEX = "^\\d{11}$";

    /**
     * 邮箱正则
     */
    public static final String EMAIL_REGEX = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$";

    /**
     * 密码正则
     */
    public static final String PASSWORD_REGEX = "^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d!@#$%^&*?_-]{6,24}$";

    /**
     * 验证码正则, 6位数字或字母
     */
    public static final String VERIFY_CODE_REGEX = "^[a-zA-Z\\d]{6}$";

    /**
     * 用户名正则，4-20位字母数字下划线
     */
    public static final String USERNAME_REGEX = "^[a-zA-Z0-9_-]{4,20}$";

}
